package com.rfsp.mcp.pojo.dto;

import com.rfsp.common.base.BaseDTO;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

public class BargainDTO extends BaseDTO {
    /** 主键ID */
    private Long id;

    /** 辅助标识，防止修改主键ID查询的漏洞，不保证唯一 */
    private String aid;

    /** 融资申请ID */
    private Long financeId;

    /** 医保平台ID */
    private Long pfmId;

    /** 中征放款流水编号（中征融资申请编号+两位数） */
    private String loanCode;

    /** 两定机构ID */
    private Long miOrgId;
    /** 两定机构ID */
    private Long orgYbjId;
    /** 医疗机构代码 */
    private String orgNo;
    /** 资金方ID */
    private Long bankOrgId;

    /** 授信合同名称 */
    @NotEmpty(message = "请填写授信合同名称")
    @Length(max = 100, message = "合同名称最多100个字符")
    private String contractName;

    /** 授信合同编号 */
    @NotEmpty(message = "请填写授信合同编号")
    @Length(max = 100, message = "合同编号最多100个字符")
    private String contractCode;

    /** 币种 */
    private String contractCurrency;

    /** 授信金额 */
    @NotNull(message = "请填写授信金额")
    @DecimalMin(value = "0",message = "请填写正确的授信金额")
    @DecimalMax(value = "999999999999.99",message = "请填写正确的授信金额")
    private BigDecimal contractAmount;

    /** 放款时间 */
    @NotNull(message = "请选择放款时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date loanStartTime;

    /** 放款金额 */
    @NotNull(message = "请填写放款金额")
    @DecimalMin(value = "0",message = "请填写正确的放款金额")
    @DecimalMax(value = "999999999999.99",message = "请填写正确的放款金额")
    private BigDecimal loanAmount;

    /** 放款利息 */
    @DecimalMin(value = "0",message = "请填写正确的放款利息")
    @DecimalMax(value = "99.9999",message = "请填写正确的放款利息")
    private BigDecimal loanRate;

    /** 放款到期时间 */
    @NotNull(message = "请选择放款到期时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date loanEndTime;

    /** 普惠业务（1：是 2：否） */
    @NotNull(message = "请选择是否普惠业务")
    private String puhuiFlag;

    /** 创建时间 */
    private Date createDate;

    /** 创建用户ID */
    private Long createUserId;

    /** 有效性标识（1：有效 2：作废） */
    private String validity;

    /** 作废原因 */
    private String repealReason;

    /** 作废时间 */
    private Date repealTime;

    /** 作废申请人 */
    private String repealApplyUser;

    /** 作废操作人ID */
    private Long repealOptUserId;

    /** 操作用户ID */
    private Long optUserId;

    /** 操作时间 */
    private Date optTime;

    /** 操作类型（1.新增 2.修改 3.删除） */
    private String optType;

    /** null */
    private String remark1;

    /** null */
    private String remark2;

    /** null */
    private String remark3;

    /** null */
    private String remark4;

    /** null */
    private String remark5;

    private Date loanDate;

    private String action;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public Long getFinanceId() {
        return financeId;
    }

    public void setFinanceId(Long financeId) {
        this.financeId = financeId;
    }

    public Long getPfmId() {
        return pfmId;
    }

    public void setPfmId(Long pfmId) {
        this.pfmId = pfmId;
    }

    public String getLoanCode() {
        return loanCode;
    }

    public void setLoanCode(String loanCode) {
        this.loanCode = loanCode;
    }

    public Long getMiOrgId() {
        return miOrgId;
    }

    public void setMiOrgId(Long miOrgId) {
        this.miOrgId = miOrgId;
    }

    public Long getBankOrgId() {
        return bankOrgId;
    }

    public void setBankOrgId(Long bankOrgId) {
        this.bankOrgId = bankOrgId;
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    public String getContractCurrency() {
        return contractCurrency;
    }

    public void setContractCurrency(String contractCurrency) {
        this.contractCurrency = contractCurrency;
    }

    public BigDecimal getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(BigDecimal contractAmount) {
        this.contractAmount = contractAmount;
    }

    public Date getLoanStartTime() {
        return loanStartTime;
    }

    public void setLoanStartTime(Date loanStartTime) {
        this.loanStartTime = loanStartTime;
    }

    public BigDecimal getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(BigDecimal loanAmount) {
        this.loanAmount = loanAmount;
    }

    public BigDecimal getLoanRate() {
        return loanRate;
    }

    public void setLoanRate(BigDecimal loanRate) {
        this.loanRate = loanRate;
    }

    public Date getLoanEndTime() {
        return loanEndTime;
    }

    public void setLoanEndTime(Date loanEndTime) {
        this.loanEndTime = loanEndTime;
    }

    public String getPuhuiFlag() {
        return puhuiFlag;
    }

    public void setPuhuiFlag(String puhuiFlag) {
        this.puhuiFlag = puhuiFlag;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public String getValidity() {
        return validity;
    }

    public void setValidity(String validity) {
        this.validity = validity;
    }

    public String getRepealReason() {
        return repealReason;
    }

    public void setRepealReason(String repealReason) {
        this.repealReason = repealReason;
    }

    public Date getRepealTime() {
        return repealTime;
    }

    public void setRepealTime(Date repealTime) {
        this.repealTime = repealTime;
    }

    public String getRepealApplyUser() {
        return repealApplyUser;
    }

    public void setRepealApplyUser(String repealApplyUser) {
        this.repealApplyUser = repealApplyUser;
    }

    public Long getRepealOptUserId() {
        return repealOptUserId;
    }

    public void setRepealOptUserId(Long repealOptUserId) {
        this.repealOptUserId = repealOptUserId;
    }

    public Long getOptUserId() {
        return optUserId;
    }

    public void setOptUserId(Long optUserId) {
        this.optUserId = optUserId;
    }

    public Date getOptTime() {
        return optTime;
    }

    public void setOptTime(Date optTime) {
        this.optTime = optTime;
    }

    public String getOptType() {
        return optType;
    }

    public void setOptType(String optType) {
        this.optType = optType;
    }

    public String getRemark1() {
        return remark1;
    }

    public void setRemark1(String remark1) {
        this.remark1 = remark1;
    }

    public String getRemark2() {
        return remark2;
    }

    public void setRemark2(String remark2) {
        this.remark2 = remark2;
    }

    public String getRemark3() {
        return remark3;
    }

    public void setRemark3(String remark3) {
        this.remark3 = remark3;
    }

    public String getRemark4() {
        return remark4;
    }

    public void setRemark4(String remark4) {
        this.remark4 = remark4;
    }

    public String getRemark5() {
        return remark5;
    }

    public void setRemark5(String remark5) {
        this.remark5 = remark5;
    }

    public Date getLoanDate() {
        return loanDate;
    }

    public void setLoanDate(Date loanDate) {
        this.loanDate = loanDate;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    private String global;

    public String getGlobal() {
        return global;
    }

    public void setGlobal(String global) {
        this.global = global;
    }

    public Long getOrgYbjId() {
        return orgYbjId;
    }

    public void setOrgYbjId(Long orgYbjId) {
        this.orgYbjId = orgYbjId;
    }

    public String getOrgNo() {
        return orgNo;
    }

    public void setOrgNo(String orgNo) {
        this.orgNo = orgNo;
    }
}
